package com.sne.airways.route.pojo;

import com.sne.airways.basecore.pojo.BaseProperties;
import org.hibernate.annotations.BatchSize;
import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import org.hibernate.annotations.GenericGenerator;

import javax.persistence.*;

/**
 * Created with IntelliJ IDEA.
 * User: 卞京帅{bjslogin@gmail.com}
 * Date: 12-11-20
 * Time: 下午10:08
 * 航空公司
 */
@Entity
@Table(name = "EXP_AIRCOMP")
@BatchSize(size=5)
@Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE)
public class ExpAirComp extends BaseProperties {

    @Id
    @GeneratedValue(generator = "system-uuid")
    @GenericGenerator(name = "system-uuid", strategy = "uuid")
    @Column(length = 45)
    public String compId;//公司id

    @Column(length = 200)
    public String compName;//公司名称

    @Column(length = 200)
    public String compEName;//英文名称

    @Column(length = 30)
    public String compCode;//公司代码

    @Column(length = 400)
    public String compDesc;//描述

    @Transient
    public String compDetail;//显示的字段

    public String getCompId() {
        return compId;
    }

    public void setCompId(String compId) {
        this.compId = compId;
    }

    public String getCompName() {
        return compName;
    }

    public void setCompName(String compName) {
        this.compName = compName;
    }

    public String getCompEName() {
        return compEName;
    }

    public void setCompEName(String compEName) {
        this.compEName = compEName;
    }

    public String getCompCode() {
        return compCode;
    }

    public void setCompCode(String compCode) {
        this.compCode = compCode;
    }

    public String getCompDesc() {
        return compDesc;
    }

    public void setCompDesc(String compDesc) {
        this.compDesc = compDesc;
    }

    public String getCompDetail() {
        return this.compCode + "-" + this.compName;
    }

    public void setCompDetail(String compDetail) {
        this.compDetail = compDetail;
    }
}
